package com.chee.plant.hibernate.object.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the corpse table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="corpse"
 */

public abstract class BaseCorpse  implements Serializable {

	public static String REF = "Corpse";
	public static String PROP_ATTACK_TYPE = "AttackType";
	public static String PROP_ATTACK_INTERVAL = "AttackInterval";
	public static String PROP_LIFE = "Life";
	public static String PROP_NAME = "Name";
	public static String PROP_ATTACK_AREA = "AttackArea";
	public static String PROP_SPEED = "Speed";
	public static String PROP_NPC_SELL = "NpcSell";
	public static String PROP_PRICE = "Price";
	public static String PROP_ATTACK = "Attack";
	public static String PROP_DEFENSE = "Defense";
	public static String PROP_EXP_GAIN = "ExpGain";
	public static String PROP_ID = "Id";
	public static String PROP_CROP_LEVEL = "CropLevel";
	public static String PROP_DESC = "Desc";


	// constructors
	public BaseCorpse () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseCorpse (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseCorpse (
		java.lang.Integer id,
		java.lang.String name,
		java.lang.String desc,
		java.lang.Integer npcSell,
		java.lang.Integer price,
		java.lang.Integer cropLevel,
		java.lang.Integer attackType,
		java.lang.Integer attackArea,
		java.lang.Integer attackInterval,
		java.lang.Integer attack,
		java.lang.Integer defense,
		java.lang.Integer speed,
		java.lang.Integer life,
		java.lang.Integer expGain) {

		this.setId(id);
		this.setName(name);
		this.setDesc(desc);
		this.setNpcSell(npcSell);
		this.setPrice(price);
		this.setCropLevel(cropLevel);
		this.setAttackType(attackType);
		this.setAttackArea(attackArea);
		this.setAttackInterval(attackInterval);
		this.setAttack(attack);
		this.setDefense(defense);
		this.setSpeed(speed);
		this.setLife(life);
		this.setExpGain(expGain);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String name;
	private java.lang.String desc;
	private java.lang.Integer npcSell;
	private java.lang.Integer price;
	private java.lang.Integer cropLevel;
	private java.lang.Integer attackType;
	private java.lang.Integer attackArea;
	private java.lang.Integer attackInterval;
	private java.lang.Integer attack;
	private java.lang.Integer defense;
	private java.lang.Integer speed;
	private java.lang.Integer life;
	private java.lang.Integer expGain;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: name
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: name
	 * @param name the name value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: desc
	 */
	public java.lang.String getDesc () {
		return desc;
	}

	/**
	 * Set the value related to the column: desc
	 * @param desc the desc value
	 */
	public void setDesc (java.lang.String desc) {
		this.desc = desc;
	}



	/**
	 * Return the value associated with the column: npc_sell
	 */
	public java.lang.Integer getNpcSell () {
		return npcSell;
	}

	/**
	 * Set the value related to the column: npc_sell
	 * @param npcSell the npc_sell value
	 */
	public void setNpcSell (java.lang.Integer npcSell) {
		this.npcSell = npcSell;
	}



	/**
	 * Return the value associated with the column: price
	 */
	public java.lang.Integer getPrice () {
		return price;
	}

	/**
	 * Set the value related to the column: price
	 * @param price the price value
	 */
	public void setPrice (java.lang.Integer price) {
		this.price = price;
	}



	/**
	 * Return the value associated with the column: crop_level
	 */
	public java.lang.Integer getCropLevel () {
		return cropLevel;
	}

	/**
	 * Set the value related to the column: crop_level
	 * @param cropLevel the crop_level value
	 */
	public void setCropLevel (java.lang.Integer cropLevel) {
		this.cropLevel = cropLevel;
	}



	/**
	 * Return the value associated with the column: attack_type
	 */
	public java.lang.Integer getAttackType () {
		return attackType;
	}

	/**
	 * Set the value related to the column: attack_type
	 * @param attackType the attack_type value
	 */
	public void setAttackType (java.lang.Integer attackType) {
		this.attackType = attackType;
	}



	/**
	 * Return the value associated with the column: attack_area
	 */
	public java.lang.Integer getAttackArea () {
		return attackArea;
	}

	/**
	 * Set the value related to the column: attack_area
	 * @param attackArea the attack_area value
	 */
	public void setAttackArea (java.lang.Integer attackArea) {
		this.attackArea = attackArea;
	}



	/**
	 * Return the value associated with the column: attack_interval
	 */
	public java.lang.Integer getAttackInterval () {
		return attackInterval;
	}

	/**
	 * Set the value related to the column: attack_interval
	 * @param attackInterval the attack_interval value
	 */
	public void setAttackInterval (java.lang.Integer attackInterval) {
		this.attackInterval = attackInterval;
	}



	/**
	 * Return the value associated with the column: attack
	 */
	public java.lang.Integer getAttack () {
		return attack;
	}

	/**
	 * Set the value related to the column: attack
	 * @param attack the attack value
	 */
	public void setAttack (java.lang.Integer attack) {
		this.attack = attack;
	}



	/**
	 * Return the value associated with the column: defense
	 */
	public java.lang.Integer getDefense () {
		return defense;
	}

	/**
	 * Set the value related to the column: defense
	 * @param defense the defense value
	 */
	public void setDefense (java.lang.Integer defense) {
		this.defense = defense;
	}



	/**
	 * Return the value associated with the column: speed
	 */
	public java.lang.Integer getSpeed () {
		return speed;
	}

	/**
	 * Set the value related to the column: speed
	 * @param speed the speed value
	 */
	public void setSpeed (java.lang.Integer speed) {
		this.speed = speed;
	}



	/**
	 * Return the value associated with the column: life
	 */
	public java.lang.Integer getLife () {
		return life;
	}

	/**
	 * Set the value related to the column: life
	 * @param life the life value
	 */
	public void setLife (java.lang.Integer life) {
		this.life = life;
	}



	/**
	 * Return the value associated with the column: exp_gain
	 */
	public java.lang.Integer getExpGain () {
		return expGain;
	}

	/**
	 * Set the value related to the column: exp_gain
	 * @param expGain the exp_gain value
	 */
	public void setExpGain (java.lang.Integer expGain) {
		this.expGain = expGain;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.Corpse)) return false;
		else {
			com.chee.plant.hibernate.object.Corpse corpse = (com.chee.plant.hibernate.object.Corpse) obj;
			if (null == this.getId() || null == corpse.getId()) return false;
			else return (this.getId().equals(corpse.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

private static final long serialVersionUID = 1L; 
}